home *** CD-ROM | disk | FTP | other *** search
/ Atari Forever 4 / Atari Forever 4.zip / Atari Forever 4.iso / PD_THEMA / EDITOREN / 7UP_PD / VDI.H < prev    next >
C/C++ Source or Header  |  1998-03-14  |  17KB  |  496 lines

  1. /*      VDI.H
  2.  
  3.         GEM VDI Definitions
  4.  
  5.         Copyright (c) Borland International 1990
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10. #if  !defined( __VDI__ )
  11. #define __VDI__
  12.  
  13. #include <vdilib.h>
  14. /*
  15. typedef struct
  16. {
  17.     int    contrl[12];
  18.     int    intin[132];
  19.     int    intout[140];
  20.     int    ptsin[145];
  21.     int    ptsout[145];
  22. } VDIPARBLK;
  23.  
  24. extern  VDIPARBLK _VDIParBlk;
  25. void  _VdiCtrl(int handle, int fkt, GEMPARBLK *_GemParBlk);
  26. */
  27. /****** Control definitions *********************************************/
  28.  
  29. #define OW_FILE          0 /* output device type in the low-order byte */
  30. #define OW_SERIAL        1
  31. #define OW_PARALLEL      2
  32. #define OW_DEVICE        3
  33. #define OW_NOCHANGE    255
  34.  
  35. #define OW_LETTER1       0 /* page size index in the high-order byte */
  36. #define OW_HALF          5
  37. #define OW_B5           10
  38. #define OW_LETTER2      20
  39. #define OW_A4           30
  40. #define OW_LEGAL        40
  41. #define OW_DOUBLE       50
  42. #define OW_BROAD        55
  43. #define OW_INDIRECT    255 /* use work_in [101] and work_in [102] */
  44.  
  45. void v_get_driver_info _((int device_id, int info_select,
  46.                           char *info_string));
  47. void    v_opnwk( int *work_in,  int *handle, int *work_out);
  48. void    v_clswk( int handle );
  49. void    v_opnvwk( int *work_in, int *handle, int *work_out);
  50. void    v_clsvwk( int handle );
  51. void    v_clrwk( int handle );
  52. void    v_updwk( int handle );
  53. int             vst_load_fonts( int handle, int select );
  54. void    vst_unload_fonts( int handle, int select );
  55. void    vs_clip( int handle, int clip_flag, int *pxyarray );
  56.  
  57.  
  58. /****** Output definitions **********************************************/
  59.  
  60. void    v_pline( int handle, int count, int *pxyarray );
  61. void    v_pmarker( int handle, int count, int *pxyarray );
  62. void    v_gtext( int handle, int x, int y, char *string );
  63. void    v_fillarea( int handle, int count, int *pxyarray );
  64. void    v_cellarray( int handle, int *pxyarray, int row_length,
  65.                      int el_used, int num_rows, int wrt_mode,
  66.                      int *colarray );
  67. void    v_contourfill( int handle, int x, int y, int index );
  68. void    vr_recfl( int handle, int *pxyarray );
  69. void    v_bar( int handle, int *pxyarray );
  70. void    v_arc( int handle, int x, int y, int radius,
  71.                int begang, int endang );
  72. void    v_pieslice( int handle, int x, int y, int radius,
  73.                     int begang, int endang );
  74. void    v_circle( int handle, int x, int y, int radius );
  75. void    v_ellarc( int handle, int x, int y, int xradius,
  76.                   int yradius, int begang, int endang );
  77. void    v_ellpie( int handle, int x, int y, int xradius,
  78.                   int yradius, int begang, int endang );
  79. void    v_ellipse( int handle, int x, int y, int xradius,
  80.                    int yradius  );
  81. void    v_rbox  ( int handle, int *pxyarray );
  82. void    v_rfbox ( int handle, int *pxyarray );
  83. void    v_justified( int handle,int x, int y, char *string,
  84.                      int length, int word_space,
  85.                      int char_space );
  86.  
  87.  
  88. /****** Attribute definitions *****************************************/
  89.  
  90. #define IP_HOLLOW       0
  91. #define IP_1PATT        1
  92. #define IP_2PATT        2
  93. #define IP_3PATT        3
  94. #define IP_4PATT        4
  95. #define IP_5PATT        5
  96. #define IP_6PATT        6
  97. #define IP_SOLID        7
  98.  
  99.  
  100. /* gsx modes */
  101.  
  102. #define MD_REPLACE      1
  103. #define MD_TRANS        2
  104. #define MD_XOR          3
  105. #define MD_ERASE        4
  106.  
  107.  
  108. /* gsx styles */
  109.  
  110. #define FIS_HOLLOW      0
  111. #define FIS_SOLID       1
  112. #define FIS_PATTERN     2
  113. #define FIS_HATCH       3
  114. #define FIS_USER        4
  115.  
  116.  
  117. /* bit blt rules */
  118.  
  119. #define ALL_WHITE        0
  120. #define S_AND_D          1
  121. #define S_AND_NOTD       2
  122. #define S_ONLY           3
  123. #define NOTS_AND_D       4
  124. #define D_ONLY           5
  125. #define S_XOR_D          6
  126. #define S_OR_D           7
  127. #define NOT_SORD         8
  128. #define NOT_SXORD        9
  129. #define D_INVERT        10
  130. #define NOT_D           11
  131. #define S_OR_NOTD       12
  132. #define NOTS_OR_D       13
  133. #define NOT_SANDD       14
  134. #define ALL_BLACK       15
  135.  
  136. /* linetypes */
  137.  
  138. #define SOLID           1
  139. #define LONGDASH        2
  140. #define DOT             3
  141. #define DASHDOT         4
  142. #define DASH            5
  143. #define DASH2DOT        6
  144. #define USERLINE        7
  145.  
  146. #define SQUARED         0
  147. #define ARROWED         1
  148. #define ROUND           2
  149.  
  150. #define PM_DOT           1 /* polymarker types */
  151. #define PM_PLUS          2
  152. #define PM_ASTERISK      3
  153. #define PM_SQUARE        4
  154. #define PM_DIAGCROSS     5
  155. #define PM_DIAMOND       6
  156.  
  157. #define TXT_NORMAL       0x0000 /* text effects */
  158. #define TXT_THICKENED    0x0001
  159. #define TXT_LIGHT        0x0002
  160. #define TXT_SKEWED       0x0004
  161. #define TXT_UNDERLINED   0x0008
  162. #define TXT_OUTLINED     0x0010
  163. #define TXT_SHADOWED     0x0020
  164.  
  165. #define ALI_LEFT         0 /* horizontal text alignment */
  166. #define ALI_CENTER       1
  167. #define ALI_RIGHT        2
  168.  
  169. #define ALI_BASE         0 /* vertical text alignment */
  170. #define ALI_HALF         1
  171. #define ALI_ASCENT       2
  172. #define ALI_BOTTOM       3
  173. #define ALI_DESCENT      4
  174. #define ALI_TOP          5
  175.  
  176. int     vswr_mode( int handle, int mode );
  177. void    vs_color( int handle, int index, int *rgb_in );
  178. int     vsl_type( int handle, int style );
  179. void    vsl_udsty( int handle, int pattern );
  180. int     vsl_width( int handle, int width );
  181. int     vsl_color( int handle, int color_index );
  182. void    vsl_ends( int handle, int beg_style, int end_style );
  183. int     vsm_type( int handle, int symbol );
  184. int     vsm_height( int handle, int height );
  185. int     vsm_color( int handle, int color_index );
  186. void    vst_height( int handle, int height, int *char_width,
  187.                     int *char_height, int *cell_width,
  188.                     int *cell_height );
  189. int     vst_point( int handle, int point, int *char_width,
  190.                     int *char_height, int *cell_width,
  191.                     int *cell_height );
  192. int     vst_rotation( int handle, int angle );
  193. int     vst_font( int handle, int font );
  194. int     vst_color( int handle, int color_index );
  195. int     vst_effects( int handle, int effect );
  196. void    vst_alignment( int handle, int hor_in, int vert_in,
  197.                        int *hor_out, int *vert_out );
  198. int     vsf_interior( int handle, int style );
  199. int     vsf_style( int handle, int style_index );
  200. int     vsf_color( int handle, int color_index );
  201. int     vsf_perimeter( int handle, int per_vis );
  202. void    vsf_udpat( int handle, int *pfill_pat, int planes );
  203.  
  204.  
  205. /****** Raster definitions *********************************************/
  206.  
  207. typedef struct memform
  208. {
  209.   void *mp;
  210.   int fwp;
  211.   int fh;
  212.   int fww;
  213.   int ff;
  214.   int np;
  215.   int r1;
  216.   int r2;
  217.   int r3;
  218. } FDB;
  219.  
  220. typedef struct
  221. {
  222.         void            *fd_addr;
  223.         int             fd_w;
  224.         int             fd_h;
  225.         int             fd_wdwidth;
  226.         int             fd_stand;
  227.         int             fd_nplanes;
  228.         int             fd_r1;
  229.         int             fd_r2;
  230.         int             fd_r3;
  231. } MFDB;
  232.  
  233. void    vro_cpyfm( int handle, int vr_mode, int *pxyarray,
  234.                    MFDB *psrcMFDB, MFDB *pdesMFDB );
  235. void    vrt_cpyfm( int handle, int vr_mode, int *pxyarray,
  236.                    MFDB *psrcMFDB, MFDB *pdesMFDB,
  237.                    int *color_index );
  238. void    vr_trnfm( int handle, MFDB *psrcMFDB, MFDB *pdesMFDB );
  239. void    v_get_pixel( int handle, int x, int y, int *pel,
  240.                      int *index );
  241.  
  242.  
  243. /****** Input definitions **********************************************/
  244. #define DEV_LOCATOR      1 /* input device */
  245. #define DEV_VALUATOR     2
  246. #define DEV_CHOICE       3
  247. #define DEV_STRING       4
  248.  
  249. #define MODE_REQUEST     1 /* input mode */
  250. #define MODE_SAMPLE      2
  251.  
  252. void    vsin_mode( int handle, int dev_type, int mode );
  253. void    vrq_locator( int handle, int x, int y, int *xout,
  254.                      int *yout, int *term );
  255. int     vsm_locator( int handle, int x, int y, int *xout,
  256.                      int *yout, int *term );
  257. void    vrq_valuator( int handle, int valuator_in,
  258.                       int *valuator_out, int *terminator );
  259. void    vsm_valuator( int handle, int val_in, int *val_out,
  260.                       int *term, int *status );
  261. void    vrq_choice( int handle, int ch_in, int *ch_out );
  262. int     vsm_choice( int handle, int *choice );
  263. void    vrq_string( int handle, int max_length, int echo_mode,
  264.                     int *echo_xy, char *string );
  265. int     vsm_string( int handle, int max_length, int echo_mode,
  266.                     int *echo_xy, char *string );
  267. void    vsc_form( int handle, int *pcur_form );
  268. void    vex_timv( int handle, int (*tim_addr)(), int (**otim_addr)(),
  269.                   int *tim_conv );
  270. void    v_show_c( int handle, int reset );
  271. void    v_hide_c( int handle );
  272. void    vq_mouse( int handle, int *pstatus, int *x, int *y );
  273. void    vex_butv( int handle, int (*pusrcode)(), int (**psavcode)() );
  274. void    vex_motv( int handle, int (*pusrcode)(), int (**psavcode)() );
  275. void    vex_curv( int handle, int (*pusrcode)(), int (**psavcode)() );
  276. void    vq_key_s( int handle, int *pstatus );
  277.  
  278.  
  279. /****** Inquire definitions *******************************************/
  280.  
  281. void    vq_extnd( int handle, int owflag, int *work_out );
  282. int     vq_color( int handle, int color_index,
  283.                   int set_flag, int *rgb );
  284. void    vql_attributes( int handle, int *attrib );
  285. void    vqm_attributes( int handle, int *attrib );
  286. void    vqf_attributes( int handle, int *attrib );
  287. void    vqt_attributes( int handle, int *attrib );
  288. void    vqt_extent( int handle, char *string, int *extent );
  289. int     vqt_width( int handle, char character,
  290.                    int *cell_width, int *left_delta,
  291.                    int *right_delta );
  292. int     vqt_name( int handle, int element_num, char *name );
  293. void    vq_cellarray( int handle, int *pxyarray,
  294.                       int row_length, int num_rows,
  295.                       int *el_used, int *rows_used,
  296.                       int *status, int *colarray );
  297. void    vqin_mode( int handle, int dew_type, int *input_mode );
  298. void    vqt_fontinfo( int handle, int *minADE, int *maxADE,
  299.                       int *distances, int *maxwidth,
  300.                       int *effects );
  301.  
  302.  
  303. /****** Escape definitions *********************************************/
  304.  
  305. #define O_B_BOLDFACE     '0' /* OUT-File definitions for v_alpha_text */
  306. #define O_E_BOLDFACE     '1'
  307. #define O_B_ITALICS      '2'
  308. #define O_E_ITALICS      '3'
  309. #define O_B_UNDERSCORE   '4'
  310. #define O_E_UNDERSCORE   '5'
  311. #define O_B_SUPERSCRIPT  '6'
  312. #define O_E_SUPERSCRIPT  '7'
  313. #define O_B_SUBSCRIPT    '8'
  314. #define O_E_SUBSCRIPT    '9'
  315. #define O_B_NLQ          'A'
  316. #define O_E_NLQ          'B'
  317. #define O_B_EXPANDED     'C'
  318. #define O_E_EXPANDED     'D'
  319. #define O_B_LIGHT        'E'
  320. #define O_E_LIGHT        'F'
  321. #define O_PICA           'W'
  322. #define O_ELITE          'X'
  323. #define O_CONDENSED      'Y'
  324. #define O_PROPORTIONAL   'Z'
  325.  
  326. #define O_GRAPHICS       "\033\033GEM,%d,%d,%d,%d,%s"
  327.  
  328. #define MUTE_RETURN     -1 /* definitions for vs_mute */
  329. #define MUTE_ENABLE      0
  330. #define MUTE_DISABLE     1
  331.  
  332. #define OR_PORTRAIT      0 /* definitions for v_orient */
  333. #define OR_LANDSCAPE     1
  334.  
  335. #define TRAY_MANUAL     -1 /* definitions for v_tray */
  336. #define TRAY_DEFAULT     0
  337. #define TRAY_FIRSTOPT    1
  338.  
  339. #define XBIT_FRACT       0 /* definitions for v_xbit_image */
  340. #define XBIT_INTEGER     1
  341.  
  342. #define XBIT_LEFT        0
  343. #define XBIT_CENTER      1
  344. #define XBIT_RIGHT       2
  345.  
  346. #define XBIT_TOP         0
  347. #define XBIT_MIDDLE      1
  348. #define XBIT_BOTTOM      2
  349.  
  350. void    vq_chcells( int handle, int *rows, int *columns );
  351. void    v_exit_cur( int handle );
  352. void    v_enter_cur( int handle );
  353. void    v_curup( int handle );
  354. void    v_curdown( int handle );
  355. void    v_curright( int handle );
  356. void    v_curleft( int handle );
  357. void    v_curhome( int handle );
  358. void    v_eeos( int handle );
  359. void    v_eeol( int handle );
  360. void    vs_curaddress( int handle, int row, int column );
  361. void    v_curaddress( int handle, int row, int column );
  362. void    v_curtext( int handle, char *string );
  363. void    v_rvon( int handle );
  364. void    v_rvoff( int handle );
  365. void    vq_curaddress( int handle, int *row, int *column );
  366. int     vq_tabstatus( int handle );
  367. void    v_hardcopy( int handle );
  368. void    v_dspcur( int handle, int x, int y );
  369. void    v_rmcur( int handle );
  370. void    v_form_adv( int handle );
  371. void    v_output_window( int handle, int *xyarray );
  372. void    v_clear_disp_list( int handle );
  373. void    v_bit_image( int handle, const char *filename,
  374.                      int aspect, int x_scale, int y_scale,
  375.                      int h_align, int v_align, int *xyarray );
  376. void    vq_scan( int handle, int *g_slice, int *g_page,
  377.                  int *a_slice, int *a_page, int *div_fac);
  378. void    v_alpha_text( int handle, char *string );
  379. void    vs_palette( int handle, int palette );
  380. void    v_sound( int handle, int frequency, int duration );
  381. int        vs_mute( int handle, int action );
  382. void    vqp_films( int handle, char *film_names );
  383. void    vqp_state( int handle, int *port, char *film_name,
  384.                    int *lightness, int *interlace,
  385.                    int *planes, int *indexes );
  386. void    vsp_state( int handle, int port, int film_num,
  387.                    int lightness, int interlace, int planes,
  388.                    int *indexes );
  389. void    vsp_save( int handle );
  390. void    vsp_message( int handle );
  391. int     vqp_error( int handle );
  392. void    v_meta_extents( int handle, int min_x, int min_y,
  393.                         int max_x, int max_y );
  394. void    v_write_meta( int handle,
  395.                       int num_intin, int *intin,
  396.                       int num_ptsin, int *ptsin );
  397. void    vm_coords( int handle, int llx, int lly, int urx, int ury );
  398. void    vm_filename( int handle, const char *filename );
  399. void    vm_pagesize( int handle, int pgwidth, int pdheight );
  400. void    v_offset( int handle, int offset );
  401. void    v_fontinit( int handle, int fh_high, int fh_low );
  402. void    v_escape2000( int handle, int times );
  403.  
  404. void    vt_resolution( int handle, int xres, int yres,
  405.                        int *xset, int *yset );
  406. void    vt_axis( int handle, int xres, int yres,
  407.                  int *xset, int *yset );
  408. void    vt_origin( int handle, int xorigin, int yorigin );
  409. void    vq_tdimensions( int handle, int *xdimension, int *ydimension );
  410. void    vt_alignment( int handle, int dx, int dy );
  411. void    vsp_film( int handle, int index, int lightness );
  412. void    vsc_expose( int handle, int state );
  413.  
  414.  
  415. #define GDOS_NONE      -2L            /* no GDOS installed           */
  416. #define GDOS_FSM       0x5F46534DL    /* '_FSM' - FSMGDOS installed  */
  417. #define GDOS_FNT       0x5F464E54L    /* '_FNT' - FONTGDOS installed */
  418.  
  419. int     vq_gdos( void );
  420. long    vq_vgdos( void );
  421.  
  422. int     v_bez_on( int handle );
  423. void    v_bez_off( int handle );
  424. void    v_set_app_buff( int handle, int **address, int nparagraphs );
  425. void    v_bez( int handle, int count, int *xyarr,
  426.                 char *bezarr, int *extent, int *totpts, int *totmoves );
  427. void    v_bez_fill( int handle, int count, int *xyarr,
  428.                      char *bezarr, int *extent, int *totpts,
  429.                      int *totmoves );
  430. int     v_bez_qual( int handle, int prcnt, int *actual );
  431.  
  432.  
  433. /****** FSMGDOS definitions ********************************************/
  434.  
  435. typedef struct
  436. {
  437.     int    value;
  438.     int    remainder;
  439.  
  440. }   fsm_int;
  441.  
  442. typedef struct
  443. {
  444.     fsm_int    x;
  445.     fsm_int    y;
  446.  
  447. }   fsm_fpoint_t;
  448.  
  449. typedef struct
  450. {
  451.     fsm_fpoint_t     pt;
  452.     fsm_fpoint_t     cpt;
  453.     fsm_int          sharp;
  454.  
  455. }   fsm_data_fpoint_t;
  456.  
  457. typedef struct fsm_component_t
  458. {
  459.     int                       resevered1;
  460.     struct fsm_component_t    *nextComponent;
  461.     unsigned char             numPoints;
  462.     unsigned char             numCurves;
  463.     unsigned char             numContours;
  464.     unsigned char             reserved2[13];
  465.     fsm_data_fpoint_t         *points;
  466.     unsigned char             *startPts;
  467.  
  468. }   fsm_component_t;
  469.  
  470.  
  471. void    vqt_f_extent( int handle, char *string, int *extent );
  472. void    v_ftext( int handle, int x, int y, char *string );
  473. void    v_killoutline( int handle, fsm_component_t *component );
  474. void    v_getoutline( int handle, int ch, fsm_component_t **component );
  475. void    vst_scratch( int handle, int mode );
  476. void    vst_error( int handle, int mode, int *errorvar );
  477. void    vqt_advance( int handle, int ch, int *advx, int *advy,
  478.                        int *remx, int *remy );
  479. int     vst_arbpt( int handle, int point, int *chwd, int *chht,
  480.                    int *cellwd, int *cellht );
  481. void    vqt_devinfo( int handle, int devnum, int *devexits,
  482.                      char *devstr );
  483. int     v_flushcache( int handle );
  484. void    vqt_cachesize( int handle, int which_cache, long *size );
  485. void    vqt_get_tables( int handle, int **gascii, int **sytle );
  486. int     v_loadcache( int handle, char *filename, int mode );
  487. int     v_savecache( int handle, char *filename );
  488. int     vst_setsize( int handle, int point, int *chwd, int *chht,
  489.                      int *cellwd, int *cellht );
  490. int     vst_skew( int handle, int skew );
  491.  
  492.  
  493. #endif
  494.  
  495. /***********************************************************************/
  496.